package cn.ds.assets.module.app.service.project;

import cn.ds.assets.framework.common.pojo.PageResult;
import cn.ds.assets.framework.mybatis.core.util.MyBatisUtils;
import cn.ds.assets.module.app.mapper.project.ProjectMapper;
import cn.ds.assets.module.assets.controller.admin.project.vo.BaseProjectCreateReqVO;
import cn.ds.assets.module.assets.controller.admin.project.vo.BaseProjectExportReqVO;
import cn.ds.assets.module.assets.controller.admin.project.vo.BaseProjectPageReqVO;
import cn.ds.assets.module.assets.controller.admin.projectMember.vo.BaseProjectMemberCreateReqVO;
import cn.ds.assets.module.assets.dal.dataobject.project.BaseProjectDO;
import cn.ds.assets.module.assets.service.project.BaseProjectService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

/**
 * 项目 Service 实现类
 *
 * @author 芋道源码
 */
@Service
@Validated
public class ProjectServiceImpl implements ProjectService {

    @Resource
    private ProjectMapper projectMapper;

    @Override
    public PageResult<BaseProjectDO> getPo(Long id){
        BaseProjectPageReqVO pageReqVO = new BaseProjectPageReqVO();
        pageReqVO.setPageNo(0);
        pageReqVO.setPageSize(10);

        IPage<BaseProjectDO> mpPage = MyBatisUtils.buildPage(pageReqVO);
        projectMapper.getPo(mpPage,1L);
        return new PageResult<>(mpPage.getRecords(), mpPage.getTotal());
    }
}
